﻿<%@ WebHandler Language="C#" Class="随机" %>

using System;
using System.Web;

public class 随机 : IHttpHandler {

    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/html";
        string str = "123";
        Random rand = new Random();
        string code = str.Substring(rand.Next(3), 1);
        if (code == "1")
        {
            context.Response.Redirect("性格测试.html"); 
        }
        else   if (code == "2")
        {
           context.Response.Redirect("性格测试1.html");
        }
        else   if (code == "3")
        {
            context.Response.Redirect("性格测试2.html");
        }
    }

    public bool IsReusable {
        get {
            return false;
        }
    }

}